package cn.terys.terystransactionclient.data;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

import cn.emagsoftware.util.StringUtilities;

public class AppParameter
{

    private Map<String, String> params = new HashMap<String, String>();

    public AppParameter()
    {
    }

    public void putParameter(String key, String value)
    {
        params.put(StringUtilities.toStringWhenNull(key, ""), StringUtilities.toStringWhenNull(value, ""));
    }

    public String getParameter(String key)
    {
        return StringUtilities.toStringWhenNull(params.get(key), "");
    }
    
    public Iterator<Entry<String, String>> getParameters()
    {
        return params.entrySet().iterator();
    }

}
